//
// C++ Interface: entry
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//

namespace xgui
{
    %feature("docstring","derives from :class:`xgui.WidgetClass` ") EntryClass;
	struct EntryClass : public xgui::WidgetClass
	{
		EntryClass();
		std::string const &className();
		bool isInstanceable();
		xgui::Object * create(xgui::Object * parent, xgui::StringMap &properties);
	};

    %feature("docstring","derives from :class:`xgui.Widget` \n\n**PROPERTIES**\n\n * **text** *(RW)* sets or retrieves the text displayed in the entry\n\n * **editable** *(RW)* if set to *\"1\"* the entry can be edited (i.e.: the contained text can be changed); if set to *\"0\"* the entry text is read-only.* default: \"1\"*\n\n * **maxlength** *(RW)* sets or retrieves the maximum length of the entry text\n\n * **password-mode** *(RW)* if set to *\"1\"* then a password character (usually '*') is displayed in place of the characters typed by the user.*default: \"0\"*\n\n * **alignment** *(RW)* sets or retrieves the text alignment of the entry box.It can be one of the following strings: *\"left\", \"center\", \"right\".default: \"left\"*\n\n**EVENTS**\n\n * **onsubmit** *(linked to* :class:`xgui.TextCallback` *)* fired when the enter key is pressed while the entry widget has the keyboard focus.the string parameter of the callback function is the entry text.\n\n * **onchange**  *(linked to* :class:`xgui.TextCallback` *)* fired when the user has taken an action that may have altered text in the entry widget.The string parameter is the altered entry text.Returning *xgui::EVT_BLOCK* from the callback function prevents the text changing.\n\n**METHODS**\n\n") Entry;
	class Entry : public xgui::Widget
	{
		protected:
			Entry ( xgui::Container * parent, std::string const &text, int maxlen, bool editable, bool password_mode );
			virtual ~Entry();

		public:
		    %feature("docstring","appends a text string to the end of the entry text\n\n*C++*::\n\n void appendText ( const std::string & text ); \n\n ") appendText;
			void appendText ( const std::string & text );
			%feature("docstring","inserts a text string at the beginning of the entry text\n\n*C++*::\n\n void prependText ( const std::string & text );\n\n") prependText;
			void prependText ( const std::string & text );
			%feature("docstring","inserts a text string at the specified position in the entry text\n\n*C++*::\n\n void insertText ( const std::string & text, int pos ); \n\n ") insertText;
			void insertText ( const std::string & text, int pos );
	};
}

%extend xgui::Entry {
	%pythoncode {
		def __del__(self):
			if self.valid: self.delPyOwner(self)
	}
}

